<template>
  <!-- swiper -->
  <van-swipe
    class="my-swipe"
    :autoplay="autoplay"
    indicator-color="white"
  >
    <van-swipe-item
      v-for="item in list"
      :key="item.id"
    >
      <img v-lazy="item.src||item.img">
    </van-swipe-item>
  </van-swipe>
</template>
<script>
export default {
  props: {
    list: {
      type: Array,
      default() {
        return []
      }
    },
    autoplay: {
      type: Number,
      default: 0
    }
  }
}
</script>
<style lang="scss">
.my-swipe {
  height: 200px;
  img {
    width: 100%;
    height: 100%;
  }
}
</style>